num = 2
count = 0;
while count != 50:
    flag = True
    for i in range(2, num // 2 + 1):
        if num % i == 0:
            flag = False
            break
    if flag:
        print(num, end=" ")
        count += 1
        if count % 10 == 0:
            print()
    num += 1